package org.bits.data;

/**
 * Defines the types of tests to be performed on a field.
 */
public enum FieldTest
{
    NOT_EQUAL,
    LESS_THAN,
    LESS_THAN_OR_EQUAL,
    EQUAL,
    GREATER_THAN_OR_EQUAL,
    GREATER_THAN,
    CONTAINS,
    CONTAINS_CASE_INSENSITIVE;

    @Override
    public String toString()
    {
        switch( this )
        {
            case NOT_EQUAL:
                return "!=";
            case LESS_THAN:
                return "<";
            case LESS_THAN_OR_EQUAL:
                return "<=";
            case EQUAL:
                return "==";
            case GREATER_THAN_OR_EQUAL:
                return ">=";
            case GREATER_THAN:
                return ">";
            case CONTAINS:
                return "contains";
            case CONTAINS_CASE_INSENSITIVE:
                return "contains (case insensitive)";
        }

        return super.toString();
    }
}
